package com.commodity.Service.userServiceImp;

import com.commodity.Dao.UserDao;
import com.commodity.Dao.userDaoImp.UserDaoImp;
import com.commodity.Service.UserService;
import com.commodity.entity.User;
import com.commodity.utils.BeanFactory;

public class UserServiceImp implements UserService {
    private final UserDao userDao = BeanFactory.getInstance(UserDaoImp.class);
    @Override
    public User findByUserName(String username) {
        return userDao.findByUserName(username);
    }

    @Override
    public boolean editPwd(String username, String password) {
        return userDao.editPwd(username,password)>0;
    }
}
